/**
 *@File ExeInfoDatabase.h 
 *
 *@Author: Bob
 *
 *@Create Time: 2017-4-10 16:06:18
 *
 *@Last Modify: Bob
 *
 *@Last Modify Time: 2017-4-10 16:06:18
 *
 *@Description:
 *   
 *
 */

#ifndef EXEINFODATABASE_H
#define EXEINFODATABASE_H

#include <string>


typedef struct _DBItem
{
	std::string strMD5;
	std::string strFilePath;
	std::string strOriginalFilename;
	std::string strFileDescription;
	std::string strFileVersion;
	std::string strProductName;
	std::string strProductVersion;
	std::string strLegalCopyright;
	std::string strSigner;
}DBItem;



class SQLiteWrapper;

class ExeInfoDatabase
{
public:
	ExeInfoDatabase();
	virtual ~ExeInfoDatabase();

	static ExeInfoDatabase* GetInstance();

	bool InsertData(std::string strFilePath, std::string strFileDescription, std::string strOriginalFilename);

	bool InsertData(std::string& strSQL, DBItem& dbItem);

	bool Initialize(const std::string& strDbPath);

	bool Initialize(const std::string& strDbPath, const std::string& strSQL);

	void ReleaseDBHandler();

	void Close();

private:
	SQLiteWrapper* m_pSqliteWrapper;
};

#endif /*end of EXEINFODATABASE_H*/ 